package com.tvein.sanguo.prompt.controller
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;
	//custom
	import com.tvein.sanguo.prompt.common.GameConstants;
	import com.tvein.sanguo.prompt.view.PromptMediator;
	import com.tvein.sanguo.prompt.model.MessageProxy;
//
	public class PromptInfo extends SimpleFabricationCommand implements ICommand
	{
		private var promptMediator:PromptMediator;
		private var messageData:MessageProxy;
		
		override public function execute(notification:INotification) : void
		{
			promptMediator = facade.retrieveMediator(PromptMediator.NAME) as PromptMediator;
			messageData = facade.retrieveProxy(MessageProxy.NAME) as MessageProxy;
			
			messageData.newMsg(notification.getBody()[0], notification.getBody()[1]);
			promptMediator.promptShell.setInfo(notification.getBody()[1]);
			
			routeNotification(GameConstants.MODULE_INVOKE, ["-shine", ["advice", true]], null, GameConstants.MODULE_TOOL + "/*");
		}
	}
}